﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StockMatch.Service;

namespace StockMatch.Service
{
    public class ServiceManager
    {
        static ServiceManager()
        {
            RolePowerConfig = new RolePowerConfig();
        }
        public static RolePowerConfig RolePowerConfig { get; set; }

        #region AdminUserService
        private static Lazy<AdminUserService> _AdminUserService = new Lazy<AdminUserService>();
        public static AdminUserService AdminUserService
        {
            get { return _AdminUserService.Value; }
        }
        #endregion

        #region DayWinProjectService
        private static Lazy<DayWinProjectService> _DayWinProjectService = new Lazy<DayWinProjectService>();
        public static DayWinProjectService DayWinProjectService
        {
            get { return _DayWinProjectService.Value; }
        }
        #endregion

        #region WeekWinProjectService
        private static Lazy<WeekWinProjectService> _WeekWinProjectService = new Lazy<WeekWinProjectService>();
        public static WeekWinProjectService WeekWinProjectService
        {
            get { return _WeekWinProjectService.Value; }
        }
        #endregion

        #region WeekWinProjectRiskMarginService
        private static Lazy<WeekWinProjectRiskMarginService> _WeekWinProjectRiskMarginService = new Lazy<WeekWinProjectRiskMarginService>();
        public static WeekWinProjectRiskMarginService WeekWinProjectRiskMarginService
        {
            get { return _WeekWinProjectRiskMarginService.Value; }
        }
        #endregion

        #region ProjectService
        private static Lazy<ProjectService> _ProjectService = new Lazy<ProjectService>();
        public static ProjectService ProjectService
        {
            get { return _ProjectService.Value; }
        }
        #endregion

        #region ProjectPrincipalService
        private static Lazy<ProjectPrincipalService> _ProjectPrincipalService = new Lazy<ProjectPrincipalService>();
        public static ProjectPrincipalService ProjectPrincipalService
        {
            get { return _ProjectPrincipalService.Value; }
        }
        #endregion

        #region DayWinProjectAccountService
        private static Lazy<DayWinProjectAccountService> _DayWinProjectAccountService = new Lazy<DayWinProjectAccountService>();
        public static DayWinProjectAccountService DayWinProjectAccountService
        {
            get { return _DayWinProjectAccountService.Value; }
        }
        #endregion

        #region DayWinProjectRiskMarginService
        private static Lazy<DayWinProjectRiskMarginService> _DayWinProjectRiskMarginService = new Lazy<DayWinProjectRiskMarginService>();
        public static DayWinProjectRiskMarginService DayWinProjectRiskMarginService
        {
            get { return _DayWinProjectRiskMarginService.Value; }
        }
        #endregion

        

        #region NewsService
        private static Lazy<NewsService> _NewsService = new Lazy<NewsService>();
        public static NewsService NewsService
        {
            get { return _NewsService.Value; }
        }
        #endregion

        #region ProjectSettingService
        private static Lazy<ProjectSettingService> _ProjectSettingService = new Lazy<ProjectSettingService>();
        public static ProjectSettingService ProjectSettingService
        {
            get { return _ProjectSettingService.Value; }
        }
        #endregion

        #region UserService
        private static Lazy<UserService> _UserService = new Lazy<UserService>();
        public static UserService UserService
        {
            get { return _UserService.Value; }
        }
        #endregion

        #region OnlineMessageService
        private static Lazy<OnlineMessageService> _OnlineMessageService = new Lazy<OnlineMessageService>();
        public static OnlineMessageService OnlineMessageService
        {
            get { return _OnlineMessageService.Value; }
        }
        #endregion
    }
}
